[ncl-talk] Problems reading monthly files with systemfunc
Laura Fowler
laura at ucar.edu
Tue Apr 23 10:09:02 MDT 2019
Hi Adriana:
You may want to add "delete(file1)" below "print(file1)" since as you wrote
file1 contains 30 files for June and 31 files for July?
Laura
On Tue, Apr 23, 2019 at 7:39 AM <adriana.bossolasco at cnrs-orleans.fr> wrote:
> 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
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
--
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000
e-mail: laura at ucar.edu
phone: 303-497-1628
!-------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190423/12542827/attachment.html>
More information about the ncl-talk
mailing list