Changeset 2618 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DTA
- Timestamp:
- 2011-02-26T13:31:38+01:00 (13 years ago)
- Location:
- branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DTA
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DTA/dtasal.F90
r2590 r2618 25 25 PRIVATE 26 26 27 PUBLIC dta_sal ! called by step.F90 and inidta.F90 28 PUBLIC dta_sal_alloc ! Called by nemogcm.F90 29 30 LOGICAL , PUBLIC, PARAMETER :: lk_dtasal = .TRUE. !: salinity data flag 31 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: s_dta !: salinity data at given time-step 32 33 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_sal ! structure of input SST (file informations, fields read) 27 PUBLIC dta_sal ! called by step.F90 and inidta.F90 28 29 LOGICAL , PUBLIC, PARAMETER :: lk_dtasal = .TRUE. !: salinity data flag 30 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: s_dta !: salinity data at given time-step 31 32 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_sal ! structure of input SST (file informations, fields read) 34 33 35 34 !! * Substitutions 36 35 # include "domzgr_substitute.h90" 37 36 !!---------------------------------------------------------------------- 38 !! NEMO/OPA 3.3 , NEMO Consortium (2010)37 !! NEMO/OPA 4.0 , NEMO Consortium (2011) 39 38 !! $Id$ 40 39 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 41 40 !!---------------------------------------------------------------------- 42 41 CONTAINS 43 44 FUNCTION dta_sal_alloc()45 IMPLICIT none46 INTEGER :: dta_sal_alloc47 INTEGER :: ierr48 49 ALLOCATE(s_dta(jpi,jpj,jpk), &50 sf_sal(1), &51 Stat=ierr)52 IF(ierr <= 0)THEN53 ALLOCATE( sf_sal(1)%fnow(jpi,jpj,jpk) )54 END IF55 56 dta_sal_alloc = ierr57 58 END FUNCTION dta_sal_alloc59 42 60 43 SUBROUTINE dta_sal( kt ) … … 69 52 !! between two monthly values. 70 53 !!---------------------------------------------------------------------- 71 INTEGER, INTENT(in) :: kt 54 INTEGER, INTENT(in) :: kt ! ocean time step 72 55 ! 73 INTEGER :: ji, jj, jk, jl, jkk ! dummyloop indicies74 INTEGER :: ik, ierr or ! temporaryintegers56 INTEGER :: ji, jj, jk, jl, jkk ! local loop indicies 57 INTEGER :: ik, ierr0, ierr1, ierr2 ! local integers 75 58 #if defined key_tradmp 76 INTEGER :: il0, il1, ii0, ii1, ij0, ij1 ! temporaryintegers59 INTEGER :: il0, il1, ii0, ii1, ij0, ij1 ! local integers 77 60 #endif 78 61 REAL(wp):: zl … … 105 88 WRITE(numout,*) '~~~~~~~ ' 106 89 ENDIF 107 ! ARPDBG moved first two allocate's into dta_sal_alloc() 108 !!$ ALLOCATE( sf_sal(1), STAT=ierror ) 109 !!$ IF( ierror > 0 ) THEN 110 !!$ CALL ctl_stop( 'dta_sal: unable to allocate sf_sal structure' ) ; RETURN 111 !!$ ENDIF 112 !!$ ALLOCATE( sf_sal(1)%fnow(jpi,jpj,jpk) ) 113 IF( sn_sal%ln_tint ) ALLOCATE( sf_sal(1)%fdta(jpi,jpj,jpk,2) ) 90 ALLOCATE( sf_sal(1) , STAT=ierr0 ) 91 ALLOCATE( sf_sal(1)%fnow(jpi,jpj,jpk) , STAT=ierr1 ) 92 IF( sn_sal%ln_tint ) ALLOCATE( sf_sal(1)%fdta(jpi,jpj,jpk,2), STAT=ierr2 ) 93 IF( ierr0+ierr1+ierr2 > 0 ) CALL ctl_stop( 'STOP', 'dta_sal: unable to allocate sf_sal structure' ) 114 94 ! ! fill sf_sal with sn_sal and control print 115 95 CALL fld_fill( sf_sal, (/ sn_sal /), cn_dir, 'dta_sal', 'Salinity data', 'namdta_sal' ) -
branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DTA/dtatem.F90
r2590 r2618 25 25 PRIVATE 26 26 27 PUBLIC dta_tem ! called by step.F90 and inidta.F90 28 PUBLIC dta_tem_alloc ! called by nemo_init in nemogcm.F90 29 30 LOGICAL , PUBLIC, PARAMETER :: lk_dtatem = .TRUE. !: temperature data flag 31 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: t_dta !: temperature data at given time-step 27 PUBLIC dta_tem ! called by step.F90 and inidta.F90 28 29 LOGICAL , PUBLIC, PARAMETER :: lk_dtatem = .TRUE. !: temperature data flag 30 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: t_dta !: temperature data at given time-step 32 31 33 32 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_tem ! structure of input SST (file informations, fields read) … … 36 35 # include "domzgr_substitute.h90" 37 36 !!---------------------------------------------------------------------- 38 !! NEMO/OPA 3.3 , NEMO Consortium (2010)37 !! NEMO/OPA 4.0 , NEMO Consortium (2011) 39 38 !! $Id$ 40 39 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 41 40 !!---------------------------------------------------------------------- 42 41 CONTAINS 43 44 FUNCTION dta_tem_alloc()45 IMPLICIT none46 INTEGER :: dta_tem_alloc47 INTEGER :: ierror48 ALLOCATE(t_dta(jpi,jpj,jpk), &49 sf_tem(1), &50 STAT=ierror )51 IF( ierror <= 0 ) THEN52 ALLOCATE( sf_tem(1)%fnow(jpi,jpj,jpk), STAT=ierror )53 END IF54 55 dta_tem_alloc = ierror56 57 END FUNCTION dta_tem_alloc58 59 42 60 43 SUBROUTINE dta_tem( kt ) … … 75 58 !! ** Action : define t_dta array at time-step kt 76 59 !!---------------------------------------------------------------------- 77 INTEGER, INTENT( in ) :: kt 60 INTEGER, INTENT( in ) :: kt ! ocean time-step 78 61 ! 79 INTEGER :: ji, jj, jk, jl, jkk 80 INTEGER :: ik, ierr or ! temporaryintegers62 INTEGER :: ji, jj, jk, jl, jkk ! dummy loop indicies 63 INTEGER :: ik, ierr0, ierr1, ierr2 ! local integers 81 64 #if defined key_tradmp 82 INTEGER :: il0, il1, ii0, ii1, ij0, ij1 ! temporaryintegers65 INTEGER :: il0, il1, ii0, ii1, ij0, ij1 ! local integers 83 66 #endif 84 67 REAL(wp):: zl … … 112 95 WRITE(numout,*) '~~~~~~~ ' 113 96 ENDIF 114 ! ARPDBG - moved into dta_tem_alloc() 115 !!$ ALLOCATE( sf_tem(1), STAT=ierror ) 116 !!$ IF( ierror > 0 ) THEN 117 !!$ CALL ctl_stop( 'dta_tem: unable to allocate sf_tem structure' ) ; RETURN 118 !!$ ENDIF 119 !!$ ALLOCATE( sf_tem(1)%fnow(jpi,jpj,jpk) ) 120 IF( sn_tem%ln_tint ) ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpk,2) ) 97 ALLOCATE( sf_tem(1) , STAT=ierr0 ) 98 ALLOCATE( sf_tem(1)%fnow(jpi,jpj,jpk) , STAT=ierr1 ) 99 IF( sn_tem%ln_tint ) ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpk,2), STAT=ierr2 ) 100 IF( ierr0+ierr1+ierr2 > 0 ) CALL ctl_stop( 'STOP', 'dta_sal: unable to allocate sf_sal structure' ) 121 101 ! ! fill sf_tem with sn_tem and control print 122 102 CALL fld_fill( sf_tem, (/ sn_tem /), cn_dir, 'dta_tem', 'Temperature data', 'namdta_tem' )
Note: See TracChangeset
for help on using the changeset viewer.