wliu_ucsd@gmail_com
New Member
Hi, there I am preparing the daliy wind forcing (wind stress) input files for ocean component of CCSM3 (pop) on yellowstone.It seems that CCSM does not manage to read ws files I placed in the input dictionary.I am a bit confused about the process of POP reading the ws files as well as the sructure of ws files. As guided from POP documents, I found in POP, it uses "READ_ARRAY" function to read the ws files by horizontal slice,into a array of SMF_DATA(nlon,nlat,2,n). The third dimension , I guess, is for TAUX, TAUY, repsectively. Therefore, I use ncl to prepare for the ws file as below. beginnlat = 116
nlon = 100
tauxy = new((/2,nlat,nlon/),"float"); read datacase = "b30.test.pop.h."dayinmon = new(12,integer)
dayinmon = (/31,28,31,30,31,30,31,31,30,31,30,31/)dayinyear = 0
do mon = 1,12
print(mon)
do day = 1,dayinmon(mon-1)
dayinyear = dayinyear + 1
monc = sprinti("%0.2i",mon)
dayc = sprinti("%0.2i",day)
dayinyrc = sprinti("%0.3i",dayinyear)do yr = 1002,1004
; print(yr)
yrc = sprinti("%0.4i",yr)
yrcm = sprinti("%0.4i",yr-1) ; shift one year
in_file = case + yrc + "-" + monc + "-" + dayc + ".nc" ; daily wind stress file
out_file = "ws."+ yrcm + "." + dayinyrc + ".12"
; here, make the daily output as the mid-dayfin = addfile(in_file, "r")
tauxy(0,:,:) = fin->TAUX ; unit: dyne/cm2
tauxy(1,:,:) = fin->TAUY tauxyp = tauxy(nlon|:,nlat|:,time|:) ; convert data to write into double format
tauxyd = 1.0d0 * tauxyp; write data in recordsetfileoption("bin", "WriteByteOrder", "LittleEndian")
do nt = 0,1
fbindirwrite(out_file,tauxyd(:,:,nt) )
end do
end do
end do
end do
end Is there something wrong with my understanding or processes? Thanks a lot! BestW
nlon = 100
tauxy = new((/2,nlat,nlon/),"float"); read datacase = "b30.test.pop.h."dayinmon = new(12,integer)
dayinmon = (/31,28,31,30,31,30,31,31,30,31,30,31/)dayinyear = 0
do mon = 1,12
print(mon)
do day = 1,dayinmon(mon-1)
dayinyear = dayinyear + 1
monc = sprinti("%0.2i",mon)
dayc = sprinti("%0.2i",day)
dayinyrc = sprinti("%0.3i",dayinyear)do yr = 1002,1004
; print(yr)
yrc = sprinti("%0.4i",yr)
yrcm = sprinti("%0.4i",yr-1) ; shift one year
in_file = case + yrc + "-" + monc + "-" + dayc + ".nc" ; daily wind stress file
out_file = "ws."+ yrcm + "." + dayinyrc + ".12"
; here, make the daily output as the mid-dayfin = addfile(in_file, "r")
tauxy(0,:,:) = fin->TAUX ; unit: dyne/cm2
tauxy(1,:,:) = fin->TAUY tauxyp = tauxy(nlon|:,nlat|:,time|:) ; convert data to write into double format
tauxyd = 1.0d0 * tauxyp; write data in recordsetfileoption("bin", "WriteByteOrder", "LittleEndian")
do nt = 0,1
fbindirwrite(out_file,tauxyd(:,:,nt) )
end do
end do
end do
end do
end Is there something wrong with my understanding or processes? Thanks a lot! BestW