[1000] | 1 | ! |
---|
[1279] | 2 | ! $Id: ce0l.F90 1531 2011-06-03 13:06:54Z musat $ |
---|
[1000] | 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 mod_phys_lmdz_para |
---|
| 22 | USE mod_const_mpi |
---|
| 23 | USE infotrac |
---|
[1492] | 24 | USE parallel, ONLY: finalize_parallel |
---|
[1319] | 25 | |
---|
[1279] | 26 | #ifdef CPP_IOIPSL |
---|
[1319] | 27 | USE ioipsl, ONLY: ioconf_calendar |
---|
[1279] | 28 | #endif |
---|
[1000] | 29 | |
---|
[1319] | 30 | #endif |
---|
| 31 | IMPLICIT NONE |
---|
| 32 | #ifndef CPP_EARTH |
---|
| 33 | WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics' |
---|
| 34 | #else |
---|
| 35 | !------------------------------------------------------------------------------- |
---|
| 36 | ! Local variables: |
---|
| 37 | LOGICAL, PARAMETER :: interbar=.TRUE., extrap=.FALSE., oldice=.FALSE. |
---|
[1000] | 38 | #include "dimensions.h" |
---|
| 39 | #include "paramet.h" |
---|
| 40 | #include "indicesol.h" |
---|
[1319] | 41 | #include "iniprint.h" |
---|
| 42 | #include "temps.h" |
---|
| 43 | #include "logic.h" |
---|
| 44 | INTEGER, PARAMETER :: longcles=20 |
---|
| 45 | REAL, DIMENSION(longcles) :: clesphy0 |
---|
| 46 | REAL, DIMENSION(iip1,jjp1) :: masque |
---|
| 47 | CHARACTER(LEN=15) :: calnd |
---|
[1511] | 48 | REAL, DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol |
---|
[1319] | 49 | !------------------------------------------------------------------------------- |
---|
| 50 | CALL conf_gcm( 99, .TRUE. , clesphy0 ) |
---|
[1000] | 51 | |
---|
[1319] | 52 | CALL init_mpi |
---|
[1000] | 53 | |
---|
[1319] | 54 | CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) |
---|
| 55 | WRITE(lunout,*)'---> klon=',klon |
---|
| 56 | IF (mpi_size>1 .OR. omp_size>1) THEN |
---|
| 57 | CALL abort_gcm('ce0l','In parallel mode, & |
---|
| 58 | & ce0l must be called only & |
---|
[1492] | 59 | & for 1 process and 1 task',1) |
---|
[1319] | 60 | ENDIF |
---|
[1000] | 61 | |
---|
[1319] | 62 | CALL InitComgeomphy |
---|
[1000] | 63 | |
---|
[1279] | 64 | #ifdef CPP_IOIPSL |
---|
[1319] | 65 | SELECT CASE(calend) |
---|
| 66 | CASE('earth_360d');CALL ioconf_calendar('360d'); calnd='a 360 jours/an' |
---|
| 67 | CASE('earth_365d');CALL ioconf_calendar('noleap'); calnd='a 365 jours/an' |
---|
| 68 | CASE('earth_366d');CALL ioconf_calendar('366d'); calnd='bissextile' |
---|
| 69 | CASE('gregorian'); CALL ioconf_calendar('gregorian'); calnd='gregorien' |
---|
| 70 | CASE('standard'); CALL ioconf_calendar('gregorian'); calnd='gregorien' |
---|
| 71 | CASE('julian'); CALL ioconf_calendar('julian'); calnd='julien' |
---|
| 72 | CASE('proleptic_gregorian'); CALL ioconf_calendar('gregorian') |
---|
| 73 | !--- DC Bof... => IOIPSL a mettre a jour: proleptic_gregorian /= gregorian |
---|
| 74 | CASE DEFAULT |
---|
| 75 | CALL abort_gcm('ce0l','Mauvais choix de calendrier',1) |
---|
| 76 | END SELECT |
---|
| 77 | WRITE(lunout,*)'CALENDRIER CHOISI: Terrestre '//TRIM(calnd) |
---|
[1279] | 78 | #endif |
---|
| 79 | |
---|
[1319] | 80 | IF (config_inca /= 'none') THEN |
---|
| 81 | #ifdef INCA |
---|
[1531] | 82 | CALL init_const_lmdz( & |
---|
| 83 | nbtr,anneeref,dayref,& |
---|
| 84 | iphysiq,day_step,nday,& |
---|
| 85 | nbsrf, is_oce,is_sic,& |
---|
| 86 | is_ter,is_lic) |
---|
| 87 | |
---|
[1319] | 88 | #endif |
---|
| 89 | END IF |
---|
[1000] | 90 | |
---|
[1319] | 91 | WRITE(lunout,'(//)') |
---|
| 92 | WRITE(lunout,*) ' ********************* ' |
---|
| 93 | WRITE(lunout,*) ' *** etat0_netcdf *** ' |
---|
| 94 | WRITE(lunout,*) ' ********************* ' |
---|
| 95 | WRITE(lunout,'(//)') |
---|
| 96 | WRITE(lunout,*) ' interbar = ',interbar |
---|
[1511] | 97 | CALL etat0_netcdf(interbar,masque,phis,ok_etat0) |
---|
[1000] | 98 | |
---|
[1319] | 99 | IF(ok_limit) THEN |
---|
| 100 | WRITE(lunout,'(//)') |
---|
| 101 | WRITE(lunout,*) ' ********************* ' |
---|
| 102 | WRITE(lunout,*) ' *** Limit_netcdf *** ' |
---|
| 103 | WRITE(lunout,*) ' ********************* ' |
---|
| 104 | WRITE(lunout,'(//)') |
---|
| 105 | CALL limit_netcdf(interbar,extrap,oldice,masque) |
---|
| 106 | END IF |
---|
| 107 | |
---|
[1492] | 108 | IF (grilles_gcm_netcdf) THEN |
---|
| 109 | WRITE(lunout,'(//)') |
---|
| 110 | WRITE(lunout,*) ' *************************** ' |
---|
| 111 | WRITE(lunout,*) ' *** grilles_gcm_netcdf *** ' |
---|
| 112 | WRITE(lunout,*) ' *************************** ' |
---|
| 113 | WRITE(lunout,'(//)') |
---|
[1511] | 114 | CALL grilles_gcm_netcdf_sub(masque,phis) |
---|
[1492] | 115 | END IF |
---|
| 116 | |
---|
| 117 | !$OMP MASTER |
---|
| 118 | CALL finalize_parallel |
---|
| 119 | !$OMP END MASTER |
---|
| 120 | |
---|
[1279] | 121 | #endif |
---|
[1319] | 122 | ! of #ifndef CPP_EARTH #else |
---|
| 123 | |
---|
| 124 | END PROGRAM ce0l |
---|
| 125 | ! |
---|
| 126 | !------------------------------------------------------------------------------- |
---|