[524] | 1 | ! |
---|
[1279] | 2 | ! $Id: ce0l.F90 1664 2012-10-09 13:29:15Z fairhead $ |
---|
[524] | 3 | ! |
---|
[1319] | 4 | !------------------------------------------------------------------------------- |
---|
| 5 | ! |
---|
| 6 | PROGRAM ce0l |
---|
| 7 | !------------------------------------------------------------------------------- |
---|
| 8 | ! Purpose: Calls etat0, creates initial states and limit_netcdf |
---|
| 9 | ! |
---|
| 10 | ! interbar=.T. for barycentric interpolation inter_barxy |
---|
| 11 | ! extrap =.T. for data extrapolation, like for the SSTs when file does not |
---|
| 12 | ! contain ocean points only. |
---|
| 13 | ! oldice =.T. for old-style ice, obtained using grille_m (grid_atob). |
---|
| 14 | ! masque is created in etat0, passed to limit to ensure consistancy. |
---|
| 15 | !------------------------------------------------------------------------------- |
---|
[1403] | 16 | USE control_mod |
---|
[1279] | 17 | #ifdef CPP_EARTH |
---|
| 18 | ! This prog. is designed to work for Earth |
---|
[1319] | 19 | USE dimphy |
---|
| 20 | USE comgeomphy |
---|
| 21 | USE infotrac |
---|
| 22 | |
---|
[1279] | 23 | #ifdef CPP_IOIPSL |
---|
[1319] | 24 | USE ioipsl, ONLY: ioconf_calendar |
---|
[1279] | 25 | #endif |
---|
[524] | 26 | |
---|
[1319] | 27 | #endif |
---|
| 28 | IMPLICIT NONE |
---|
| 29 | #ifndef CPP_EARTH |
---|
| 30 | WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics' |
---|
| 31 | #else |
---|
| 32 | !------------------------------------------------------------------------------- |
---|
| 33 | ! Local variables: |
---|
| 34 | LOGICAL, PARAMETER :: interbar=.TRUE., extrap=.FALSE., oldice=.FALSE. |
---|
[524] | 35 | #include "dimensions.h" |
---|
| 36 | #include "paramet.h" |
---|
| 37 | #include "indicesol.h" |
---|
[1319] | 38 | #include "iniprint.h" |
---|
| 39 | #include "temps.h" |
---|
| 40 | #include "logic.h" |
---|
| 41 | INTEGER, PARAMETER :: longcles=20 |
---|
| 42 | REAL, DIMENSION(longcles) :: clesphy0 |
---|
| 43 | REAL, DIMENSION(iip1,jjp1) :: masque |
---|
| 44 | CHARACTER(LEN=15) :: calnd |
---|
[1511] | 45 | REAL, DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol |
---|
[1319] | 46 | !------------------------------------------------------------------------------- |
---|
| 47 | CALL conf_gcm( 99, .TRUE. , clesphy0 ) |
---|
[524] | 48 | |
---|
[1319] | 49 | CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) |
---|
| 50 | WRITE(lunout,*)'---> klon=',klon |
---|
| 51 | CALL InitComgeomphy |
---|
[822] | 52 | |
---|
[1279] | 53 | #ifdef CPP_IOIPSL |
---|
[1319] | 54 | SELECT CASE(calend) |
---|
| 55 | CASE('earth_360d');CALL ioconf_calendar('360d'); calnd='a 360 jours/an' |
---|
| 56 | CASE('earth_365d');CALL ioconf_calendar('noleap'); calnd='a 365 jours/an' |
---|
| 57 | CASE('earth_366d');CALL ioconf_calendar('366d'); calnd='bissextile' |
---|
| 58 | CASE('gregorian'); CALL ioconf_calendar('gregorian'); calnd='gregorien' |
---|
| 59 | CASE('standard'); CALL ioconf_calendar('gregorian'); calnd='gregorien' |
---|
| 60 | CASE('julian'); CALL ioconf_calendar('julian'); calnd='julien' |
---|
| 61 | CASE('proleptic_gregorian'); CALL ioconf_calendar('gregorian') |
---|
| 62 | !--- DC Bof... => IOIPSL a mettre a jour: proleptic_gregorian /= gregorian |
---|
| 63 | CASE DEFAULT |
---|
| 64 | CALL abort_gcm('ce0l','Mauvais choix de calendrier',1) |
---|
| 65 | END SELECT |
---|
| 66 | WRITE(lunout,*)'CALENDRIER CHOISI: Terrestre '//TRIM(calnd) |
---|
[1279] | 67 | #endif |
---|
| 68 | |
---|
[1664] | 69 | IF (type_trac == 'inca') THEN |
---|
[1319] | 70 | #ifdef INCA |
---|
| 71 | CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday) |
---|
| 72 | CALL init_inca_para(iim,jjm+1,klon,1,klon_mpi_para_nb,0) |
---|
| 73 | WRITE(lunout,*)'nbtr =' , nbtr |
---|
| 74 | #endif |
---|
| 75 | END IF |
---|
[524] | 76 | |
---|
[1319] | 77 | WRITE(lunout,'(//)') |
---|
| 78 | WRITE(lunout,*) ' ********************* ' |
---|
| 79 | WRITE(lunout,*) ' *** etat0_netcdf *** ' |
---|
| 80 | WRITE(lunout,*) ' ********************* ' |
---|
| 81 | WRITE(lunout,'(//)') |
---|
| 82 | WRITE(lunout,*) ' interbar = ',interbar |
---|
[1511] | 83 | CALL etat0_netcdf(interbar,masque,phis,ok_etat0) |
---|
[524] | 84 | |
---|
[1319] | 85 | IF(ok_limit) THEN |
---|
| 86 | WRITE(lunout,'(//)') |
---|
| 87 | WRITE(lunout,*) ' ********************* ' |
---|
| 88 | WRITE(lunout,*) ' *** Limit_netcdf *** ' |
---|
| 89 | WRITE(lunout,*) ' ********************* ' |
---|
| 90 | WRITE(lunout,'(//)') |
---|
| 91 | CALL limit_netcdf(interbar,extrap,oldice,masque) |
---|
| 92 | END IF |
---|
| 93 | |
---|
[1492] | 94 | IF (grilles_gcm_netcdf) THEN |
---|
| 95 | WRITE(lunout,'(//)') |
---|
| 96 | WRITE(lunout,*) ' *************************** ' |
---|
| 97 | WRITE(lunout,*) ' *** grilles_gcm_netcdf *** ' |
---|
| 98 | WRITE(lunout,*) ' *************************** ' |
---|
| 99 | WRITE(lunout,'(//)') |
---|
[1511] | 100 | CALL grilles_gcm_netcdf_sub(masque,phis) |
---|
[1492] | 101 | END IF |
---|
[1279] | 102 | #endif |
---|
[1319] | 103 | ! of #ifndef CPP_EARTH #else |
---|
| 104 | |
---|
| 105 | END PROGRAM ce0l |
---|
| 106 | ! |
---|
| 107 | !------------------------------------------------------------------------------- |
---|