Error using c_climatology.m...

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
jvratnam
Posts: 10
Joined: Thu Oct 13, 2005 4:26 pm
Location: Frontier Research Center for Global Change

Error using c_climatology.m...

#1 Unread post by jvratnam »

I am trying to use d_climatology.m script to create a climatology file for ROMS. However, when I switch on the flag S.def_v3d to 1. I get an error

>> d_climatology

NC2 Error
Error using c_climatology (line 848)
C_CLIMATOLOGY: ENDDEF - unable to leave definition mode.

Error in d_climatology (line 121)
[~]=c_climatology(S);

This error is not seen once I remove the did.Nr dimension from both u and v components

Var.dimid = [did.v3d_time did.Nr did.yu did.xu];
to
Var.dimid = [did.v3d_time did.yu did.xu];

ie removing one dimension, which of course is wrong.

Can some one help me in removing the error.

I am using R2011b version of matlab

I corrected a small typo in c_climatology.m on line 174 (changed Dname.v2d_time to Dname.v3d_time).

Ratnam

jvratnam
Posts: 10
Joined: Thu Oct 13, 2005 4:26 pm
Location: Frontier Research Center for Global Change

Re: Error using c_climatology.m...

#2 Unread post by jvratnam »

I found that the problem was with allocating large arrays. So I wrote the "S.def_v3d" variables into a separate file by running the script d_climatology.m and this time setting S.def_temp and S.def_salt to zero

Ratnam

Post Reply