[524] | 1 | ! |
---|
[1279] | 2 | ! $Id: ce0l.F90 2247 2015-03-25 17:24:15Z lguez $ |
---|
[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 |
---|
[1785] | 22 | USE indice_sol_mod |
---|
[1319] | 23 | |
---|
[1279] | 24 | #ifdef CPP_IOIPSL |
---|
[2247] | 25 | USE ioipsl, ONLY: ioconf_calendar, getin |
---|
| 26 | #else |
---|
| 27 | ! if not using IOIPSL, we still need to use (a local version of) getin |
---|
| 28 | use ioipsl_getincom, only: getin |
---|
[1279] | 29 | #endif |
---|
[524] | 30 | |
---|
[1319] | 31 | #endif |
---|
| 32 | IMPLICIT NONE |
---|
| 33 | #ifndef CPP_EARTH |
---|
[1615] | 34 | #include "iniprint.h" |
---|
[1319] | 35 | WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics' |
---|
| 36 | #else |
---|
| 37 | !------------------------------------------------------------------------------- |
---|
| 38 | ! Local variables: |
---|
| 39 | LOGICAL, PARAMETER :: interbar=.TRUE., extrap=.FALSE., oldice=.FALSE. |
---|
[524] | 40 | #include "dimensions.h" |
---|
| 41 | #include "paramet.h" |
---|
[1785] | 42 | !#include "indicesol.h" |
---|
[1319] | 43 | #include "iniprint.h" |
---|
| 44 | #include "temps.h" |
---|
| 45 | #include "logic.h" |
---|
| 46 | REAL, DIMENSION(iip1,jjp1) :: masque |
---|
| 47 | CHARACTER(LEN=15) :: calnd |
---|
[1511] | 48 | REAL, DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol |
---|
[2247] | 49 | logical use_filtre_fft |
---|
[1319] | 50 | !------------------------------------------------------------------------------- |
---|
[2221] | 51 | CALL conf_gcm( 99, .TRUE. ) |
---|
[524] | 52 | |
---|
[2247] | 53 | use_filtre_fft=.FALSE. |
---|
| 54 | CALL getin('use_filtre_fft',use_filtre_fft) |
---|
| 55 | IF (use_filtre_fft) THEN |
---|
| 56 | write(lunout, fmt = *) 'FFT filter is not available in the ' & |
---|
| 57 | // 'sequential version of the dynamics.' |
---|
| 58 | write(lunout, fmt = *) & |
---|
| 59 | "Your setting of variable use_filtre_fft is not used." |
---|
| 60 | ENDIF |
---|
| 61 | |
---|
[1319] | 62 | CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) |
---|
| 63 | WRITE(lunout,*)'---> klon=',klon |
---|
| 64 | CALL InitComgeomphy |
---|
[822] | 65 | |
---|
[1279] | 66 | #ifdef CPP_IOIPSL |
---|
[1319] | 67 | SELECT CASE(calend) |
---|
| 68 | CASE('earth_360d');CALL ioconf_calendar('360d'); calnd='a 360 jours/an' |
---|
| 69 | CASE('earth_365d');CALL ioconf_calendar('noleap'); calnd='a 365 jours/an' |
---|
| 70 | CASE('earth_366d');CALL ioconf_calendar('366d'); calnd='bissextile' |
---|
| 71 | CASE('gregorian'); CALL ioconf_calendar('gregorian'); calnd='gregorien' |
---|
| 72 | CASE('standard'); CALL ioconf_calendar('gregorian'); calnd='gregorien' |
---|
| 73 | CASE('julian'); CALL ioconf_calendar('julian'); calnd='julien' |
---|
| 74 | CASE('proleptic_gregorian'); CALL ioconf_calendar('gregorian') |
---|
| 75 | !--- DC Bof... => IOIPSL a mettre a jour: proleptic_gregorian /= gregorian |
---|
| 76 | CASE DEFAULT |
---|
| 77 | CALL abort_gcm('ce0l','Mauvais choix de calendrier',1) |
---|
| 78 | END SELECT |
---|
| 79 | WRITE(lunout,*)'CALENDRIER CHOISI: Terrestre '//TRIM(calnd) |
---|
[1279] | 80 | #endif |
---|
| 81 | |
---|
[1563] | 82 | IF (type_trac == 'inca') THEN |
---|
[1319] | 83 | #ifdef INCA |
---|
| 84 | CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday) |
---|
| 85 | CALL init_inca_para(iim,jjm+1,klon,1,klon_mpi_para_nb,0) |
---|
| 86 | WRITE(lunout,*)'nbtr =' , nbtr |
---|
| 87 | #endif |
---|
| 88 | END IF |
---|
[524] | 89 | |
---|
[1319] | 90 | WRITE(lunout,'(//)') |
---|
| 91 | WRITE(lunout,*) ' ********************* ' |
---|
| 92 | WRITE(lunout,*) ' *** etat0_netcdf *** ' |
---|
| 93 | WRITE(lunout,*) ' ********************* ' |
---|
| 94 | WRITE(lunout,'(//)') |
---|
| 95 | WRITE(lunout,*) ' interbar = ',interbar |
---|
[1511] | 96 | CALL etat0_netcdf(interbar,masque,phis,ok_etat0) |
---|
[524] | 97 | |
---|
[1319] | 98 | IF(ok_limit) THEN |
---|
| 99 | WRITE(lunout,'(//)') |
---|
| 100 | WRITE(lunout,*) ' ********************* ' |
---|
| 101 | WRITE(lunout,*) ' *** Limit_netcdf *** ' |
---|
| 102 | WRITE(lunout,*) ' ********************* ' |
---|
| 103 | WRITE(lunout,'(//)') |
---|
| 104 | CALL limit_netcdf(interbar,extrap,oldice,masque) |
---|
| 105 | END IF |
---|
| 106 | |
---|
[1984] | 107 | |
---|
| 108 | WRITE(lunout,'(//)') |
---|
| 109 | WRITE(lunout,*) ' *************************** ' |
---|
| 110 | WRITE(lunout,*) ' *** grilles_gcm_netcdf *** ' |
---|
| 111 | WRITE(lunout,*) ' *************************** ' |
---|
| 112 | WRITE(lunout,'(//)') |
---|
| 113 | CALL grilles_gcm_netcdf_sub(masque,phis) |
---|
| 114 | |
---|
[1279] | 115 | #endif |
---|
[1319] | 116 | ! of #ifndef CPP_EARTH #else |
---|
| 117 | |
---|
| 118 | END PROGRAM ce0l |
---|
| 119 | ! |
---|
| 120 | !------------------------------------------------------------------------------- |
---|