source: CONFIG/LMDZOR/branches/LMDZOR_v4/CREATE/SCRIPT/get_era.x @ 1190

Last change on this file since 1190 was 1189, checked in by jgipsl, 14 years ago

Modifications in config LMDZOR_v4 (config under developement) :

  • The model LMDZ should be in directory modipsl/model/LMDZ (and not LMDZ4)
  • bug in script get_era.x
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/csh
2#set verbose echo
3
4set an_debut=2000
5set an_fin=2000
6set mois_debut=1
7set mois_fin=2
8
9# startfile : chemin entier pour fichier start.nc
10set startfile=/data/jgipsl/CRE_GUIDAGE/ELC-144x142x39_clim_start.nc
11
12# outdir : repertoire qui sera cree pour les nouveaux fichiers
13set outdir=ERAI-144x142
14#########################################################
15if ( ! -d $outdir ) then
16    mkdir $outdir
17endif
18cd $outdir
19#######################
20# Boucle sur les annees
21#######################
22set an=$an_debut
23set imois=$mois_debut
24while ( $an <= $an_fin )
25    #########################################################
26    #  gestion du nombre de jours pour les annees bisextiles.
27    ##########################################################
28
29    set tt=`echo $an | awk ' { print $1 /4. - int ( $1 / 4 ) } '`
30    echo tt=$tt
31
32    if ( $tt == 0 ) then
33        set nd=( 31 29 31 30 31 30 31 31 30 31 30 31)
34    else
35        set nd=( 31 28 31 30 31 30 31 31 30 31 30 31)
36    endif
37
38    #####################
39    # Boucle sur les mois
40    ######################
41
42    while ( $imois <= $mois_fin )
43
44        if ( $imois <= 9 ) then
45            set mois=0$imois
46        else
47            set mois=$imois
48        endif
49
50        set netat=`expr $nd[$imois] \* 4`
51        echo netat=$netat
52
53        echo ../era2gcm.x $mois $an 1 $netat $startfile
54        ../era2gcm.x $mois $an 1 $netat $startfile
55
56        set imois=`expr $imois + 1`
57       
58    end
59
60    set an=`expr $an + 1`
61    set imois=1
62
63end
64
65#####################################################
66# Ajout du premier etat du mois suvivant a la fin de
67# chaque mois (si le mois suivant exist)
68#####################################################
69cd ..
70./add_step.x.new $an_debut $an_fin $mois_debut $mois_fin _ERAI_ $outdir
Note: See TracBrowser for help on using the repository browser.