1 |
C $Header: /u/gcmpack/MITgcm/pkg/land/land_read_pickup.F,v 1.6 2009/08/27 18:00:01 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*(10) suff |
42 |
CHARACTER*(MAX_LEN_FNAM) fn |
43 |
CEOP |
44 |
|
45 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
46 |
|
47 |
IF ( .NOT.land_pickup_read_mnc ) THEN |
48 |
|
49 |
IF ( rwSuffixType.EQ.0 ) THEN |
50 |
WRITE(fn,'(A,I10.10)') 'pickup_land.',myIter |
51 |
ELSE |
52 |
CALL RW_GET_SUFFIX( suff, startTime, myIter, myThid ) |
53 |
WRITE(fn,'(A,A10)') 'pickup_land.',suff |
54 |
ENDIF |
55 |
prec = precFloat64 |
56 |
|
57 |
IF ( land_oldPickup ) THEN |
58 |
C- Read fields as consecutive records |
59 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
60 |
& land_groundT, 1, myIter, myThid ) |
61 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
62 |
& land_groundW, 2, myIter, myThid ) |
63 |
|
64 |
ELSE |
65 |
|
66 |
C- Read fields as consecutive records |
67 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
68 |
& land_enthalp, 1, myIter, myThid ) |
69 |
CALL READ_REC_3D_RL( fn, prec, land_nLev, |
70 |
& land_groundW, 2, myIter, myThid ) |
71 |
k=2*land_nLev |
72 |
CALL READ_REC_3D_RL( fn, prec, 1, |
73 |
& land_skinT, k+1, myIter, myThid ) |
74 |
CALL READ_REC_3D_RL( fn, prec, 1, |
75 |
& land_hSnow, k+2, myIter, myThid ) |
76 |
CALL READ_REC_3D_RL( fn, prec, 1, |
77 |
& land_snowAge,k+3, myIter, myThid ) |
78 |
|
79 |
ENDIF |
80 |
|
81 |
ENDIF |
82 |
|
83 |
#ifdef ALLOW_MNC |
84 |
IF ( land_pickup_read_mnc ) THEN |
85 |
|
86 |
DO k = 1,MAX_LEN_FNAM |
87 |
fn(k:k) = ' ' |
88 |
ENDDO |
89 |
WRITE(fn,'(A)') 'pickup_land' |
90 |
CALL MNC_FILE_CLOSE_ALL_MATCHING(fn, myThid) |
91 |
CALL MNC_CW_SET_UDIM(fn, 1, myThid) |
92 |
CALL MNC_CW_SET_CITER(fn, 3, 3, myIter, -1, myThid) |
93 |
|
94 |
CALL MNC_CW_RL_R('D',fn,0,0, |
95 |
& 'land_enthalp', land_enthalp, myThid) |
96 |
CALL MNC_CW_RL_R('D',fn,0,0, |
97 |
& 'land_groundW', land_groundW, myThid) |
98 |
|
99 |
CALL MNC_CW_RL_R('D',fn,0,0, |
100 |
& 'land_skinT', land_skinT, myThid) |
101 |
CALL MNC_CW_RL_R('D',fn,0,0, |
102 |
& 'land_hSnow', land_hSnow, myThid) |
103 |
CALL MNC_CW_RL_R('D',fn,0,0, |
104 |
& 'land_snAge', land_snowAge, myThid) |
105 |
|
106 |
ENDIF |
107 |
#endif |
108 |
|
109 |
C- jmc: exchange is not really necessary for land model |
110 |
C- and presently exchange S/R cannot work for 3d array where 3rd dim <> Nr |
111 |
|
112 |
#endif /* ALLOW_LAND */ |
113 |
|
114 |
RETURN |
115 |
END |