1 |
C $Header: /u/gcmpack/MITgcm/pkg/land/land_read_pickup.F,v 1.5 2007/11/05 15:40:24 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "LAND_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: LAND_READ_PICKUP |
8 |
C !INTERFACE: |
9 |
SUBROUTINE LAND_READ_PICKUP( myIter, myThid ) |
10 |
|
11 |
C !DESCRIPTION: \bv |
12 |
C *==========================================================* |
13 |
C | S/R LAND_READ_PICKUP |
14 |
C | o Reads current state of land model from a pickup file |
15 |
C *==========================================================* |
16 |
C \ev |
17 |
|
18 |
C !USES: |
19 |
IMPLICIT NONE |
20 |
|
21 |
C == Global variables === |
22 |
#include "LAND_SIZE.h" |
23 |
#include "EEPARAMS.h" |
24 |
#include "PARAMS.h" |
25 |
#include "LAND_PARAMS.h" |
26 |
#include "LAND_VARS.h" |
27 |
|
28 |
C == Routine Arguments == |
29 |
C myIter :: time-step number |
30 |
C myThid :: Number of this instance |
31 |
INTEGER myIter |
32 |
INTEGER myThid |
33 |
|
34 |
#ifdef ALLOW_LAND |
35 |
|
36 |
C !LOCAL VARIABLES: |
37 |
C fn :: character buffer for creating filename |
38 |
C prec :: precision of pickup files |
39 |
C k :: loop index |
40 |
INTEGER prec, k |
41 |
CHARACTER*(MAX_LEN_FNAM) fn |
42 |
CEOP |
43 |
|
44 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
45 |
|
46 |
IF ( .NOT.land_pickup_read_mnc ) THEN |
47 |
|
48 |
WRITE(fn,'(A,I10.10)') 'pickup_land.',myIter |
49 |
prec = precFloat64 |
50 |
|
51 |
IF ( land_oldPickup ) THEN |
52 |
C- Read fields as consecutive records |
53 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
54 |
& land_groundT, 1, myIter, myThid ) |
55 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
56 |
& land_groundW, 2, myIter, myThid ) |
57 |
|
58 |
ELSE |
59 |
|
60 |
C- Read fields as consecutive records |
61 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
62 |
& land_enthalp, 1, myIter, myThid ) |
63 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
64 |
& land_groundW, 2, myIter, myThid ) |
65 |
k=2*land_nLev |
66 |
CALL READ_REC_3D_RL( fn, prec, 1, |
67 |
& land_skinT, k+1, myIter, myThid ) |
68 |
CALL READ_REC_3D_RL( fn, prec, 1, |
69 |
& land_hSnow, k+2, myIter, myThid ) |
70 |
CALL READ_REC_3D_RL( fn, prec, 1, |
71 |
& land_snowAge,k+3, myIter, myThid ) |
72 |
|
73 |
ENDIF |
74 |
|
75 |
ENDIF |
76 |
|
77 |
#ifdef ALLOW_MNC |
78 |
IF ( land_pickup_read_mnc ) THEN |
79 |
|
80 |
DO k = 1,MAX_LEN_FNAM |
81 |
fn(k:k) = ' ' |
82 |
ENDDO |
83 |
WRITE(fn,'(A)') 'pickup_land' |
84 |
CALL MNC_FILE_CLOSE_ALL_MATCHING(fn, myThid) |
85 |
CALL MNC_CW_SET_UDIM(fn, 1, myThid) |
86 |
CALL MNC_CW_SET_CITER(fn, 3, 3, myIter, -1, myThid) |
87 |
|
88 |
CALL MNC_CW_RL_R('D',fn,0,0, |
89 |
& 'land_enthalp', land_enthalp, myThid) |
90 |
CALL MNC_CW_RL_R('D',fn,0,0, |
91 |
& 'land_groundW', land_groundW, myThid) |
92 |
|
93 |
CALL MNC_CW_RL_R('D',fn,0,0, |
94 |
& 'land_skinT', land_skinT, myThid) |
95 |
CALL MNC_CW_RL_R('D',fn,0,0, |
96 |
& 'land_hSnow', land_hSnow, myThid) |
97 |
CALL MNC_CW_RL_R('D',fn,0,0, |
98 |
& 'land_snAge', land_snowAge, myThid) |
99 |
|
100 |
ENDIF |
101 |
#endif |
102 |
|
103 |
C- jmc: exchange is not really necessary for land model |
104 |
C- and presently exchange S/R cannot work for 3d array where 3rd dim <> Nr |
105 |
|
106 |
#endif /* ALLOW_LAND */ |
107 |
|
108 |
RETURN |
109 |
END |