[ncl-talk] Problems reading monthly files with systemfunc

adriana.bossolasco at cnrs-orleans.fr adriana.bossolasco at cnrs-orleans.fr
Tue Apr 23 07:39:50 MDT 2019


Hi Everyone

I have a problem for read monthly files with systemfunc
I know that the problem is because the first month that I read is JUN 
which have 30 days and the when I try to read JUL with 31 days my code 
says:

fatal:Dimension sizes of left hand side and right hand side of 
assignment do not match

How can I fix this? Maybe is very basic but I don't realize

I copy my code here

begin
;************************************************
; variable and file handling
;************************************************


year1=2001
year2=2002
nyear=year2-year1
print(nyear)
month1=6
month2=8
nmonths=month2-month1

do i = 1,nyear
  do j = 1,nmonths
print(nmonths)
print(nyear)
if (month1+j-1 .ge. 10) then
  mois=10
else
  mois="0"+(j-1+month1)  ;
end if
print(mois)

file1 = systemfunc(" ls 
/PROJETS/MOUSSON-NEW/MAM_GEOS_8y_rest/MAM_GEOS_8y_rest.cam.h0.200"+i+"-"+mois+"*-43200.nc")
print(file1)

end do
end do

end


-- 
Adriana Bossolasco
LPC2E UMR 7328 (CNRS, Université d'Orléans)
3A avenue de la Recherche Scientifique
45071 Orléans Cedex 2 - FRANCE
Tel  +33 (0)2 38 25 52 85
e-mail: adriana.bossolasco at cnrs-orleans.fr


More information about the ncl-talk mailing list